home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-12-11 | 1.8 KB | 69 lines | [TEXT/MPS ] |
- // UAEGestalt.cp
- // Copyright © 1991 by Apple Computer, Inc. All rights reserved.
- // Kent Sandvik DTS
- // This file contains the basic TAEApplication member functions
-
-
- // INCLUDES
-
- #ifndef __AEGESTALT__
- #include "UAEGestalt.h" // class definitions
- #endif
-
- // TAEApplication
-
- // Empty constructor - for avoiding ptabs in global data space
- #pragma segment ARes
- TAEApplication::TAEApplication() {}
-
- // Initialize the Application object
-
- #pragma segment AInit
- pascal void TAEApplication::IAEApplication(OSType fileType, OSType creator)
- {
- inherited::IApplication(fileType, creator);
-
- if (gDeadStripSuppression){ // so the linker doesn't dead strip class info
- macroDontDeadStrip(TLabelView);
- macroDontDeadStrip(TInformationView);
- macroDontDeadStrip(TGrayFill);
- }
- RegisterStdType("TGrayFill", 'gray'); // register adorner types
- }
-
-
- // Create a new TDocument from the class
-
- #pragma segment AOpen
- pascal TDocument* TAEApplication::DoMakeDocument(CommandNumber /* itsCmdNumber */,
- TFile* /* itsFile */)
- {
- TAEDocument* aAEDocument = new TAEDocument;
- aAEDocument->IAEDocument();
- return aAEDocument;
- }
-
-
- // Handle incoming AppleEvents calls, in our case to the TAEServerCommand
-
- #pragma segment ASelCommand
- pascal void TAEApplication::DoAppleCommand(CommandNumber theNumber,
- const AppleEvent& message,
- const AppleEvent& reply)
- {
- switch(theNumber)
- {
- // case Gestalt server AE, create a command from the AE, and post it!
- case cAEProvideGestaltInfo:
- TAEServerCommand* aCommand = new TAEServerCommand;
- aCommand->InitializeFromAppleEvent(theNumber, this, kCantUndo,
- kDoesNotCauseChange, NULL, message, reply);
- this->PostAnEvent(aCommand);
- break;
-
- default:
- inherited::DoAppleCommand(theNumber, message, reply);
- }
- }
-
-